﻿using Microsoft.Extensions.Configuration;
using MiniFox.Platform.Applications.Configurations;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace MiniFox.Platform.Applications.Models
{
    /// <summary>
    /// 全局配置
    /// </summary>
    [JsonObject]
    public class SystemGlobalConfig
    {
        /// <summary>
        /// 系统标题
        /// </summary>
        [JsonProperty("title")]
        public string Title
        {
            get;
            set;
        }
        /// <summary>
        /// 系统描述
        /// </summary>
        [JsonProperty("description")]
        public string Description
        {
            get;
            set;
        }
        /// <summary>
        /// 系统版权
        /// </summary>
        [JsonProperty("copyright")]
        public string CopyRight
        {
            get;
            set;
        }
        /// <summary>
        /// ICP备案
        /// </summary>
        [JsonProperty("icp")]
        public string ICP
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("iconUri")]
        public string IconUri
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("logoUri")]
        public string LogoUri
        {
            get;
            set;
        }
        /// <summary>
        /// 默认主题
        /// </summary>
        [JsonProperty("theme")]
        public string Theme
        {
            get;
            set;
        }
        /// <summary>
        /// 获取或设置抛出异常后，默认的警告地址
        /// </summary>
        [JsonProperty("warningUri")]
        public string WarningUri
        {
            get;
            set;
        }
        /// <summary>
        /// 内置url (登录访问，不参与授权检查)
        /// </summary>    
        [JsonProperty("builtinUrls")]
        public string[] BuiltinUrls
        {
            get;
            set;
        }
        /// <summary>
        /// 默认应用ID
        /// </summary>
        [JsonProperty("defaultAppId")]
        public string DefaultApplicationID
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("homeUri")]
        public string HomeUri
        {
            get;
            set;
        }
    }
    /// <summary>
    /// 
    /// </summary>
    public class EnvConfig
    {
        /// <summary>
        /// 系统标题
        /// </summary>
        [JsonProperty("title")]
        public string Title
        {
            get;
            set;
        }
        /// <summary>
        /// 系统描述
        /// </summary>
        [JsonProperty("description")]
        public string Description
        {
            get;
            set;
        }
        /// <summary>
        /// 系统版权
        /// </summary>
        [JsonProperty("copyright")]
        public string CopyRight
        {
            get;
            set;
        }
        /// <summary>
        /// ICP备案
        /// </summary>
        [JsonProperty("icp")]
        public string ICP
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("icon")]
        public string Icon
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("logo")]
        public string Logo
        {
            get;
            set;
        }
        /// <summary>
        /// 默认主题
        /// </summary>
        [JsonProperty("theme")]
        public string Theme
        {
            get;
            set;
        }
        /// <summary>
        /// 获取或设置抛出异常后，默认的警告地址
        /// </summary>
        [JsonProperty("warningUri")]
        public string WarningUri
        {
            get;
            set;
        }
        /// <summary>
        /// 内置url (登录访问，不参与授权检查)
        /// </summary>    
        [JsonProperty("builtinUrls")]
        public string[] BuiltinUrls
        {
            get;
            set;
        }
        /// <summary>
        /// 默认应用ID
        /// </summary>
        [JsonProperty("defaultAppId")]
        public string DefaultApplicationID
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("homeUri")]
        public string HomeUri
        {
            get;
            set;
        }
    }
}
